﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ray2010
{
    public class Ray2010
    {
        public List<Node> nodes;
        public StrategyBenchmarker strategybenchmarker;
        public Tools tools;
        public InputFileAnalyzer inputFileAnalyzer;
        public Sequence sequence;
        public OutputFileGenerator outputfilegenerator;

        public Ray2010()
        {
            nodes = new List<Node>();
            strategybenchmarker = new StrategyBenchmarker();
            tools = new Tools();
            sequence = new Sequence();
            outputfilegenerator = new OutputFileGenerator(this, "output.txt");
        }

        public void Execute(string filePath)
        {
            try
            {
                inputFileAnalyzer = new InputFileAnalyzer(this, filePath);
                nodes[3].AddConnectedNode(nodes[4]);
                nodes[5].AddConnectedNode(nodes[6]);
                nodes[5].AddConnectedNode(nodes[8]);
                outputfilegenerator.WriteNodes();
            }
            catch(Exception e)
            {
                MessageBox.Show(e.ToString());
            }
        }
    }
}
